package com.server.mould.business.base;

import com.project.annotation.model.base.PageResult;
import com.project.annotation.model.base.ResultBase;
import com.server.mould.domain.reqeust.base.PageBaseRequest;
import com.server.mould.domain.reqeust.base.RequestValueBase;
import com.server.mould.domain.result.base.ResultValueBase;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

public interface BaseViewCtrlInterface<T extends RequestValueBase, W extends ResultValueBase> {

    @PostMapping("/Search")
    ResultBase<W> Search(@RequestBody T item) throws Exception;

    @PostMapping("/SearchPage")
    ResultBase<PageResult<W>> SearchPage(@RequestBody PageBaseRequest<T> item) throws Exception;

    @PostMapping("/SearchInner")
    ResultBase<W> SearchInner(@RequestBody T item) throws Exception;

    @PostMapping("/SearchPageInner")
    ResultBase<PageResult<W>> SearchPageInner(@RequestBody PageBaseRequest<T> item) throws Exception;

}
